home *** CD-ROM | disk | FTP | other *** search
- on getmainData
- global myfile
- if the machineType = 256 then
- set i to the moviePath & "main.dat"
- else
- set i to the moviePath & "main.dat"
- end if
- set DaPath to i
- if objectp(myfile) then
- set myfile to 0
- end if
- set myfile to new(xtra("fileio"))
- openFile(myfile, DaPath, 1)
- set Adinfo to readFile(myfile)
- put Adinfo into field "mainData"
- closeFile(myfile)
- set myfile to 0
- end
-
- on countContent
- global numOfEditBanners
- set numOfEditBanners to the lineCount of member "mainData"
- end
-
- on nextEditBanner
- global currentBanner, numOfEditBanners
- set currentBanner to currentBanner + 1
- if currentBanner > numOfEditBanners then
- set currentBanner to 1
- else
- nothing()
- end if
- end
-
- on nextEditMember
- global currentBanner, numOfEditBanners, currentEditMember
- set the itemDelimiter to TAB
- set currentEditMember to 2
- set i to item currentEditMember of line currentBanner of field "mainData"
- set temp to item currentEditMember + 1 of line currentBanner of field "mainData"
- if i = EMPTY then
- set currentEditMember to 1
- nextEditBanner()
- else
- puppetSprite(10, 1)
- set the member of sprite 10 to member i of castLib "edit banners"
- puppetTransition(23, 1, 80, 0)
- set the text of field "dummyText" to temp
- updateStage()
- end if
- set the itemDelimiter to ","
- end
-
- on importEditBanners
- global myfile
- if the machineType = 256 then
- set i to the moviePath & "EditBanners.dat"
- else
- set i to the moviePath & "EditBanners.dat"
- end if
- set DaPath to i
- if objectp(myfile) then
- set myfile to 0
- end if
- set myfile to new(xtra("fileio"))
- openFile(myfile, DaPath, 1)
- set Adinfo to readFile(myfile)
- put Adinfo into field "editList"
- closeFile(myfile)
- set myfile to 0
- if the machineType = 256 then
- set finalPath to the moviePath & "\Images"
- else
- set finalPath to the moviePath & "Images:"
- end if
- set the itemDelimiter to TAB
- set flibbertyGibbet to the number of items in field "editList"
- repeat with x = 1 to flibbertyGibbet
- set canOfWhupAss to finalPath & item x of field "editList"
- set theName to item x of field "editList"
- set the fileName of member x of castLib "edit Banners" to canOfWhupAss
- set the itemDelimiter to "."
- set the name of member x of castLib "edit Banners" to item 1 of theName
- set the itemDelimiter to TAB
- end repeat
- set the itemDelimiter to ","
- end
-